package com.example.entity;

import com.mysql.cj.jdbc.MysqlXADataSource;

import javax.sql.XADataSource;
import java.io.Serializable;
import java.util.function.Supplier;

/**
 * Author wangJinLong
 * Date 2025/8/22 16:00
 **/
public class MysqlXaDataSourceSupplier implements Supplier<XADataSource>, Serializable {
    private static final long serialVersionUID = 1L;

    private final XADataSource xaDataSource;

    public MysqlXaDataSourceSupplier(MysqlXADataSource xaDataSource) {
        this.xaDataSource = xaDataSource;
    }

    @Override
    public XADataSource get() {
        return xaDataSource;
    }
}